<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .box {
            display: flex;


            width: 500px;
            height: 500px;
            border: 1px solid red;
        }

        .box1 {

            flex: 1;
            /*
            等价：
            flex-grow: 1;
            flex-shrink: 1;
            flex-basis: 0%; 等价写了  width: 0
            */

            width: 100px;
            height: 100px;
            background-color: #f00;
        }

        .box2 {
            flex: 2;
            /*
                        等价：
                        flex-grow: 2;
                        flex-shrink: 1;
                        flex-basis: 0%; 等价写了  width: 0
                        */

            width: 100px;
            height: 100px;
            background-color: #0f0;
        }

        .box3 {

            width: 100px;
            height: 100px;
            background-color: #00f;
        }



    </style>
</head>
<body>
<div class="box">
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
</div>
</body>
<script type="text/javascript">

</script>

</html>
